home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / WimpSWIs / s / 01Init < prev    next >
Text File  |  1995-08-26  |  2KB  |  57 lines

  1. ;
  2. ;       Title                  : Wimp Task Init.
  3. ;       System                 : Wimp Library
  4. ;       Version                : 1.1
  5. ;       Copyright              : (C) John Winters
  6. ;       Date                   : 12th January, 1990
  7. ;       Author                 : John H. Winters
  8. ;
  9. ;       Function               : Initialises the Wimp to multi-task.
  10. ;
  11. ;
  12. ;       Modification history.
  13. ;
  14. ;       Version                : (Reflect in header IDENT)
  15. ;       Date                   :
  16. ;       Author                 :
  17. ;       Changes                :
  18. ;
  19. ;
  20. ;============================================================================
  21. ;
  22. ;  Include files.
  23. ;
  24. ;============================================================================
  25. ;
  26.         GET     ^.h.regdefs
  27.         GET     ^.h.swinos
  28.         GET     ^.h.macros
  29. ;
  30. ;============================================================================
  31. ;
  32. ;  Code.
  33. ;
  34. ;============================================================================
  35. ;
  36.         PREAMBLE
  37.         STARTCODE Wimp_Initialise
  38. ;
  39.         STMFD   sp!, {v1, v2, lr}
  40.  
  41.         MOV     v1, a3                          ; R4 is ptr to taskhandle int
  42.         MOV     a3, a2                          ; R2 is ptr to taskname
  43.         MOV     v2, a1                          ; R5 is ptr to version int
  44.         LDR     a1, [v2, #0]                    ; R0 is version int
  45.         LDR     a2, DATA
  46.         ; Added by PColmer:
  47.         ; optional parameter for RISC OS 3, R3 is ptr to list of msgs (reg a4)
  48.         SWI     SWI_Wimp_Initialise + XOS_Bit
  49.         STRVC   a1, [v2, #0]                    ; return found version
  50.         STRVC   a2, [v1, #0]                    ; return task handle
  51.         MOVVC   a1, #0
  52.         LDMFD   sp!, {v1, v2, pc}^
  53. DATA
  54.         DCB     "TASK"
  55. ;
  56.         END
  57.